<script type="text/javascript">
<!--
	  $(document).ready(function() {
	  //	alert('asd');
	      $('#fileData').dataTable( {
					"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
					"sPaginationType": "full_numbers",	
                    "aaSorting": [[ 0, "desc" ]],
                    "iDisplayLength": 25,
					"bJQueryUI": true,
					"sDom": '<"H"frlT><"clear">t<"clear"><"F"ip>',
					'bProcessing'    : true,
					'bServerSide'    : true,
					'sAjaxSource'    : '<?php echo site_url(); ?>/product/category/get',
					'fnServerData': function(sSource, aoData, fnCallback)
					{
					  $.ajax
					  ({
						'dataType': 'json',
						'type'    : 'POST',
						'url'     : sSource,
						'data'    : aoData,
						'success' : fnCallback
					  });
					},	
						
					"oTableTools": {
						
						"aButtons": [
								// "copy",
								"csv",
								"xls",
								{
									"sExtends": "pdf",
									"sPdfOrientation": "landscape",
									"sPdfMessage": ""
								},
								
						]
					},
					"oLanguage": {
					  "sSearch": "Filter: "
					},
					"aoColumns": [ 
					   null,null,
					  { "bSortable": false }
					]
					
                } );
	  })
//-->
</script>
<h2 style="background-color:#368EE0; color:white; font-size:20px; padding:5px;">Category Listing</h2>
<div class="row-fluid">
<div class="span6"><?php echo form_open_multipart('/product/category/import');?>

<b style="color:green;">Import File : </b><input type="file" name="sel_file" size=20>
<input type="submit" class="btn btn-info" name="submit" value="submit">

<?php echo form_close();?></div>
<div class="span6" align="right"  ><a href="<?php echo site_url('product/Table_export/excel_category/category');?>"><input type="button" class="btn btn-primary" value="Export as Excel"></a><a href="<?php echo site_url('product/category/create_category');?>"><input type="button" class="btn btn-inverse" value="New Category"></a></div>
</div>
	<table id="fileData" cellpadding=0 cellspacing=10 width="100%" class="table table-bordered">
		<thead>
        <tr>
		<th> Name</th>
		<th>Description</th>
		<th style="width:45px;">Actions</th>        
		</tr>
        </thead>
		<tbody>
			<tr>
            	<td colspan="4" class="dataTables_empty">Loading data from server</td>
			</tr>

        </tbody>
	</table>
